// 源插件
import React, { PureComponent } from 'react';
// 视图插件
import { Button, Card, Form, Modal, notification } from 'antd';
// 外部组件
import StandardTablePro from '@/components/UpgradeStandardTable/StandardTablePro';
import { connect } from 'dva';
// css OR less预编译器

// 图片

/**
 *  Describe:数据连接
 */

@connect(({ fund }) => ({
  fund,
}))
@Form.create()
class OptionModal extends PureComponent {
  componentWillMount() {}

  /**
   *  Describe:当前状态
   */

  state = {
    listLoading: false, // 加载状态
  };

  okHandle() {
    this.props.dataSourceChange();
    this.props.closeVisbile();
  }

  cancelHandle() {
    this.props.dataSourceChange();
    this.props.closeVisbile();
  }



  render() {
    const { visible, dataSource, title } = this.props;
    return (
      <Modal
        destroyOnClose
        title={title}
        visible={visible}
        width={window.innerWidth * 0.9}
        centered
        onOk={this.okHandle.bind(this)}
        onCancel={this.cancelHandle.bind(this)}
      >
        <StandardTablePro dataSource={dataSource} handleSave={this.props.handleSave.bind(this)} />
      </Modal>
    );
  }

  componentDidMount() {}

  componentWillUnmount() {}
}

export default OptionModal;
